/*
 * Created on 2-Jul-06
 * Filename: RejectedCommand.java
 * @author Daniel Yule
 * 
 */
package com.danicsoft.daide.command;

import com.danicsoft.daide.token.TokenMap;
import com.danicsoft.daide.token.TokenGroup;

public class RejectedCommand extends ReducibleCommand {

	public RejectedCommand(Command command) {
		this.command = command;
		setStatus(COMMAND_STATUS.REJECTED);
	}

	public RejectedCommand(TokenGroup tokens) throws ParseException {
		super(tokens);
	}



	@Override
	public byte getType() {
		return TokenMap.Commands.REJ;
	}

	@Override
	public String toString() {
		return new StringBuilder("Server rejected:\n").append(command.toString()).toString();
	}

	@Override
	public COMMAND_STATUS getStatus() {
		return COMMAND_STATUS.REJECTED;
	}

}
